package imgshare.mapper;

import imgshare.model.Collect;
import imgshare.model.Image;
import imgshare.model.vo.CollectState;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CollectMapper {

    // 查找用户收藏image列表
    List<Image> selectByCollect(Integer userId);

    int insert(@Param("imageId") Integer imageId, @Param("userId") Integer userId);

    List<Integer> selectCollectedImageIdByUserId(Integer userId);

    Collect selectByKeyPair(@Param("imageId") Integer imageId,@Param("userId") Integer userId);

    int delete(Collect collect);
}
